Completed
Push — master ( b8a2ae...421529 )
by Samson
02:36
created

scribe(ꞌGeezConverterTestꞌ)   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 22
Code Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 12
nc 1
nop 0
dl 0
loc 22
rs 9.8
c 0
b 0
f 0

5 Functions

Rating   Name   Duplication   Size   Complexity  
A GeezConverterTest.js ➔ ??? 0 20 1
A GeezConverterTest.js ➔ ... ➔ ??? 0 6 1
A GeezConverterTest.js ➔ ... ➔ ??? 0 3 1
A GeezConverterTest.js ➔ ... ➔ ??? 0 8 1
A GeezConverterTest.js ➔ ... ➔ ??? 0 4 1
1
const assert = require('assert');
2
3
const TestCase = require('./TestCase');
4
const GeezConverter = require('../src/Converter/GeezConverter');
5
const NotAnIntegerArgumentException = require('../src/Exception/NotAnIntegerArgumentException');
6
7
const geezConverter = new GeezConverter();
8
9
/* global describe, it */
10
11
describe('GeezConverterTest', () => {
12
  describe('#test_geez_converter()', () => {
13
    it('should convert ascii number to geez', () => {
14
      TestCase.geezNumberTestDataProvider().forEach(([$number, $geez_number]) => {
15
        const $result = geezConverter.convert($number);
16
        assert.equal($geez_number, $result);
17
      });
18
    });
19
  });
20
21
  describe('#test_invalid_number_throw_exception()', () => {
22
    it('should throws NotAnIntegerArgumentException', () => {
23
      TestCase.invalidNumberDataProvider().forEach(($number) => {
24
        assert.throws(() => {
25
          geezConverter.convert($number);
26
        }, NotAnIntegerArgumentException);
27
      });
28
    });
29
  });
30
});
31